Replication data and code for: Revised estimates of racial and ethnic disparities in rooftop photovoltaic deployment in the United States
(DOI: 10.1038/s41893-023-01134-4)

Authors: Fedor A. Dokshin and Brian C. Thiede
Contact: fedor.dokshin@utoronto.ca

Data sources:
Census Tract information obtained from the 2013 ACS 5-year file
Historic Google Sunroof data obtained from Kaggle: https://www.kaggle.com/siddhantss/google-sunroof-eda/data?select=sunroof_solar_potential_by_censustract.csv

Files:

Code
data_preperation.r: takes the raw Census Tract data and Google Sunroof data and creates two versions of analytic samples
analysis&figures.r: replicates all figures and tables included in the manuscript for each of the two analytic samples


Data
acs_df_2013.rds: Raw census tract information from the 2013 ACS 5-year file
sunroof_solar_potential_by_censustract(09082017).csv: Google Sunroof data from Kaggle
combined_sunter_sample.rds: first sample created by data_preperation.r, which excludes tracts based on median income and Google Sunroof coverage only
sample_filter_count_200.rds: second sample creatd by data_preparation.r (used in the analysis reported in manuscript), which excludes tracts based on median income and Google Sunroof coverage and also if Google Sunroof reports coverage >100% and tract has >200 qualified buildings.

Additional data files included for convenience in "results" folder:
These four files are produced from the loop starting at line 292 in analysis&figures.r
They contain estimates from the optimized loess models for each sample. 
These are included for convenience, because of the long computing time required to run the loop.